<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/23/023
 * Time: 10:03
 */

namespace app\api\model;


class AdminLog extends BaseModel {

    public static function addAdminLog($admin_id, $msg, $table = '', $id = 0) {
        $log_data = [
            'admin_id' => $admin_id,
            'msg' => $msg
        ];
        if ($table && $id) {
            $log_data['update_table'] = $table;
            $log_data['table_data_id'] = $id;
        }
        self::create($log_data);
    }
}